<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="animate.css">
    <script type="text/javascript" src="../vue/vue.js"></script>
</head>
<body>

<style>
    p{
        width: 180px;
        height: 180px;
        /*opacity: 0;*/
        background: red;
        margin: 0 auto;
    }
</style>

<div id="box">
    <input type="button" value="点击显示隐藏" @click="show=!show">

    <transition enter-active-class="zoomInLeft"
    leave-active-class="zoomOutRight">
        <p v-show="show" class="animated"></p>
    </transition>
</div>

<script>
    new Vue({
        el:'#box',
        data:{
            show:false
        }
    })
</script>

</body>
</html>